/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.jsysacc.asistencia.model.logic.maestros;

import com.jsysacc.asistencia.model.beans.maestros.Area;
import com.jsysacc.asistencia.model.dao.design.maestros.IAreaDAO;
import com.jsysacc.asistencia.model.dao.factory.MainDAOFactory;
import java.util.ArrayList;

/**
 *
 * @author Carlos
 */
public class AreaLogic {

    IAreaDAO areaDAO = MainDAOFactory.getInstance().getAreaDAO();

    public AreaLogic() {
    }

    public ArrayList<Area> getAll() throws Exception {
        return areaDAO.getAll();
    }

    public ArrayList<Area> getByCriterio(String criterio, String valor) throws Exception {
        return areaDAO.getByCriterio(criterio, valor);
    }

    public Area getByPk(String pk) throws Exception {
        return areaDAO.getByPk(pk);
    }

    public boolean delete(String pk) throws Exception {
        return areaDAO.delete(pk);
    }

    public boolean insert(Area entity) throws Exception {
        return areaDAO.insert(entity);
    }

    public boolean update(Area entity) throws Exception {
        return areaDAO.update(entity);
    }

}
